import type { GetCodeData, GetCodeParams, LoginCodeData, LoginCodeParams, UserData } from "@/types/user";
import { request } from "@/utils/request";

/**
 * 获取短信验证码
 */
export const getCodeApi=(params:GetCodeParams)=>{
  return request.get<null,GetCodeData>('/code',{params})
}

/**
 * 手机验证码登录
 */
export const loginByMobileApi = (data:LoginCodeParams)=>request.post<null,LoginCodeData>('/login',data)

/**
 * 获取个人中心数据
 */
export const userInfoApi = () => {
  return request.get<null, UserData>('/patient/myUser')
}